<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>负外边距居中方法</title>
	<style>
		html,body{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 500px;
			height: 350px;
			position: absolute;
			top: 50%;
			left: 50%;
			margin-left: -250px;
			margin-top: -175px;
			color: #fff;
			background: #888;
			border: 1px solid #c00;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="small">
			Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellat qui recusandae, numquam! Non quas at nemo adipisci magni cumque saepe, atque, beatae impedit, esse doloremque aliquid nulla exercitationem sed sequi.
		</div>
	</div>
</body>
</html>